package com.wzy.staticProxy.impl;

import com.wzy.staticProxy.IUserDao;

/**
 * 代理对象类
 */
public class UserDaoProxy implements IUserDao {
    //目标对象
    private IUserDao target;

    public UserDaoProxy(IUserDao target){
        this.target = target;
    }

    public void save() {
        System.out.println("开始事务...");
        target.save();
        System.out.println("结束事务...");
    }
}
